import request from "@/utils/request";

export function getResourceByInfoId(id) {
    return request({
        url: '/api/resource/getResourceByInfoId/' + id,
        method: 'get'
    })
}

export function downloadResource(id, filename) {
    return request({
        url: '/api/resource/downloadResource/' + id,
        method: 'get',
        params: {'filename':filename}
    })
}

export function getFileTree(id, type) {
    return request({
        url: '/api/resource/getFileTree/' + id,
        method: 'get',
        params: {'type':type}
    })
}

export function getImg(id) {
    return request({
        url: '/api/resource/getImg/' + id,
        method: 'get'
    })
}
